<div class="search-bar" style="float: none">
    <!--    <div class="search-bar-first">
            <select id="grouplist" name="grouplist" onchange="javascript:selectGroup(this)">
                <option value="0" selected="selected">--查询条件--</option>
                <option value="1">任务编号</option>   
                <option value="3">交易时间</option>
            </select>
            <input name="textValue" id="textValue" type="text" />
            <label id="selectTimes">开始时间:</label>
            <input id="startTime" type="text" onclick="laydate()">
            <label id="selectTimee">结束时间:</label>
            <input id="endTime" type="text" onclick="laydate()">
    
            <input type="button" id="btnSelect" class="btn-submit-m" value="搜索" />
            <input type="button" id="btnSelectToExcel" class="btn-submit-m" value="导出Excel" onclick="ToExcel()" />
        </div>
        <div class="product_nil_tip" id="product_nil_tip" style="display: none; top: 58px;"><span class="me_tip">请输入或选择查询条件</span></div>-->
</div>
<table class="product-tab">
    <thead>
    <td width="40">编号</td>
    <td>提交时间</td>
    <td>初始金额</td>
    <td>交易金额</td>
    <td>账户余额</td>
    <td align="center">
        <a id="sort-product-group-handle" class="arrows down" href="javascript:void(0);">&nbsp;交易类型</a>
    </td>
</thead>
<!--priduct list start-->
<tbody id="product-list">
    {volist name='data.list' id='vo' key='key'}
    <tr>
        <td>{$key+$data['star']}</td>
        <td width="110">{$vo.add_time|date='Y/m/d H:i:s',###}</td>
        <td>{$vo.star_amount}</td>
        <td>{$vo.transaction_amount}</td>
        <td>{$vo.amount}</td>
        <td>{$type[$vo['type']]}</td>
    </tr>
    {/volist}
</tbody>
</table>
<div class="pagination clearfix" id="pagination">
    <input type="hidden" name="totalpage" class="totalpage" value="8" />
    <form name="paginationForm" method="post" action="{:U('Task/TransactionRecords')}">
        <input class="gotopage-hide" type="hidden" name="page" value="" />
        <input type="hidden" name="action" value='' />
    </form>
    <!--<div class="page-number">Page 1 of 0</div>-->
    <!--    <div class="page-skip">
            Go to page
            <input id="gotoPageNum" size="3" type="text" class="page-skip-text" value="" />
            <input id="GotoPageBtn" type="button" value="" class="page-skip-button" />
        </div>-->
    <div class="page-links clearfix">
        {$data.page}
    </div>
</div>
<script>
    $(function() {
        //搜索
        $("#btnSelect").click(function() {
            var grouplist = $("#grouplist").val();
            var textValue = $("#textValue").val();
            var startTimeS = $("#startTime").val()
            var endTimeS = $("#endTime").val()
            jQuery('#ManageProductListView').showLoading();
            $.get("{:U('Task/TransactionList')}", {}, function(data) {
                $("#ManageProductListView").html(data); //这里是重点，右侧数据获取后要显示到div中
                jQuery('#ManageProductListView').hideLoading();        //任务执行成功，关闭进度条
            }, "text");
        });
        $("#startTime").val('');
        $("#endTime").val('');
        var grouplist = $("#grouplist").val();
        if (grouplist == 3) {
            $("#textValue").hide();
            $("#startTime").show();
            $("#endTime").show();
            $("#selectTimes").show();
            $("#selectTimee").show();
        } else {
            $("#textValue").show();
            $("#startTime").hide();
            $("#endTime").hide();
            $("#selectTimes").hide();
            $("#selectTimee").hide();
        }
        $("#grouplist").change(function() {
            var grouplistValue = $("#grouplist").val();
            if (grouplistValue == 0 || grouplistValue == 1 || grouplistValue == 2) {
                $("#textValue").show();
                $("#startTime").hide();
                $("#endTime").hide();
                $("#selectTimes").hide();
                $("#selectTimee").hide();
            }
            if (grouplistValue == 3) {
                $("#textValue").hide();
                $("#startTime").show();
                $("#endTime").show();
                $("#selectTimes").show();
                $("#selectTimee").show();
            }
        })
    })
    function ToExcel() {
        var grouplist = $("#grouplist").val();
        var textValue = $("#textValue").val();
        var startTimeS = $("#startTime").val()
        var endTimeS = $("#endTime").val()
        window.location.href = "/BrushProduc/RecordsAllToExcel?" + 'pageIndex=1&startTime=' + startTimeS + '&endTime=' + endTimeS + '&grouplist=' + grouplist + '&textValue=' + textValue
    }
    function GetManageProductList(Index) {
        jQuery('#ManageProductListView').showLoading();
        $.get("{:U('Task/TransactionList')}", {p: Index}, function(data) {
            $("#ManageProductListView").html(data); //这里是重点，右侧数据获取后要显示到div中
            jQuery('#ManageProductListView').hideLoading();        //任务执行成功，关闭进度条
        }, "text");
    }
</script>



